package main.resources.controller.command.forum;

import main.resources.controller.command.Command;
import main.resources.controller.dao.moodle.MdlForumDao;
import main.resources.exceptions.DaoException;
import main.resources.model.entity.moodle.MdlForum;

public class ForumRemoveCommand implements Command {

	private MdlForum forum;
	private String id;
	
	public ForumRemoveCommand(String id) {
		this.id = id;
	}

	@Override
	public void execute() throws DaoException {
		this.forum = MdlForumDao.getInstance().find(id);
		MdlForumDao.getInstance().remove(forum);
	}

}
